<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改用户</title>
    <script type="application/javascript" th:src="@{/layui/layui.js}"></script>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
</head>
<body>

<form class="layui-form" action="/bill/updateBill" method="post">
    <div class="layui-form-item">
        <input type="hidden" name="id" th:value="${bill.getId()}">
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">订单编号</label>
        <div class="layui-input-block">
            <input type="text" name="billCode"  lay-verify="required" placeholder="请输入订单编号" autocomplete="off" class="layui-input" th:value="${bill.getBillCode()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品名称</label>
        <div class="layui-input-block">
            <input type="text" name="productName"  lay-verify="required" placeholder="请输入商品名称" autocomplete="off" class="layui-input" th:value="${bill.getProductName()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品描述</label>
        <div class="layui-input-inline">
            <textarea type="desc" name="productDesc" placeholder="请输入描述" class="layui-textarea">[[${bill.getProductDesc()}]]</textarea>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品单位</label>
        <div class="layui-inline">
            <input type="text" class="layui-input" id="test1" name="productUnit" lay-verify="required" placeholder="请输入商品单位" autocomplete="off" th:value="${bill.getProductUnit()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品数量</label>
        <div class="layui-input-block">
            <input type="text" name="productCount" required  lay-verify="required" placeholder="请输入商品数量" autocomplete="off" class="layui-input" th:value="${bill.getProductCount()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品总额</label>
        <div class="layui-input-block">
            <input type="text" name="totalPrice" required  lay-verify="required" placeholder="请输入地址" autocomplete="off" class="layui-input" th:value="${bill.getTotalPrice()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否支付</label>
        <div class="layui-input-block">
            <input type="radio" name="isPayment" value="2" title="已支付" th:checked="${bill.getIsPayment()==2?true:false}">
            <input type="radio" name="isPayment" value="1" title="未支付" th:checked="${bill.getIsPayment()==1?true:false}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">供应商</label>
        <div class="layui-input-block">
            <select name="providerId" lay-verify="" lay-search >
                <option th:each="provider:${providerList}" th:value="${provider.getId}" th:selected="${provider.getId()==bill.getId()?true:false}">[[${provider.getProName}]]</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

</body>
</html>